﻿using Algorithms;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace UnitTests
{
    
    
    /// <summary>
    ///This is a test class for ConvertHullTest and is intended
    ///to contain all ConvertHullTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ConvertHullTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for ConvertHull Constructor
        ///</summary>
        [TestMethod()]
        public void ConvertHullConstructorTest()
        {
            ConvertHull target = new ConvertHull();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for AllPointsOnRight
        ///</summary>
        [TestMethod()]
        public void AllPointsOnRightTest()
        {
            Point p1 = null; // TODO: Initialize to an appropriate value
            Point p2 = null; // TODO: Initialize to an appropriate value
            Point[] A = null; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = ConvertHull.AllPointsOnRight(p1, p2, A);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for IsLeft
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void IsLeftTest()
        {
            ConvertHull_Accessor target = new ConvertHull_Accessor(); // TODO: Initialize to an appropriate value
            Point_Accessor P0 = null; // TODO: Initialize to an appropriate value
            Point_Accessor P1 = null; // TODO: Initialize to an appropriate value
            Point_Accessor P2 = null; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.IsLeft(P0, P1, P2);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Run
        ///</summary>
        [TestMethod()]
        public void RunTest()
        {
            ConvertHull target = new ConvertHull(); // TODO: Initialize to an appropriate value
            target.Run();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for bruteForceConvexHull
        ///</summary>
        [TestMethod()]
        public void bruteForceConvexHullTest()
        {
            Point[] inputpointset = null; // TODO: Initialize to an appropriate value
            Point[] expected = null; // TODO: Initialize to an appropriate value
            Point[] actual;
            actual = ConvertHull.bruteForceConvexHull(inputpointset);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ccw
        ///</summary>
        [TestMethod()]
        public void ccwTest()
        {
            Point a = null; // TODO: Initialize to an appropriate value
            Point b = null; // TODO: Initialize to an appropriate value
            Point c = null; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = ConvertHull.ccw(a, b, c);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for chainHull_2D
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void chainHull_2DTest()
        {
            ConvertHull_Accessor target = new ConvertHull_Accessor(); // TODO: Initialize to an appropriate value
            Point_Accessor[] P = null; // TODO: Initialize to an appropriate value
            int n = 0; // TODO: Initialize to an appropriate value
            Point_Accessor[] H = null; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.chainHull_2D(P, n, H);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for determinantformula
        ///</summary>
        [TestMethod()]
        public void determinantformulaTest()
        {
            Point p1 = null; // TODO: Initialize to an appropriate value
            Point p2 = null; // TODO: Initialize to an appropriate value
            Point p3 = null; // TODO: Initialize to an appropriate value
            double expected = 0F; // TODO: Initialize to an appropriate value
            double actual;
            actual = ConvertHull.determinantformula(p1, p2, p3);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
